//
//  KBImgngViewController.m
//  KOBERouter_Example
//
//  Created by 刘红武 on 2018/2/1.
//  Copyright © 2018年 kobe. All rights reserved.
//

#import "KBImgngViewController.h"
#import "PrinterViewController.h"
#import <Masonry/Masonry.h>
@interface KBImgngViewController ()

@end

@implementation KBImgngViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UIImageView *uploneImgview = [[UIImageView alloc] initWithFrame:CGRectMake(30, 30, 150, 100)];
    NSBundle *bundle = [NSBundle bundleForClass:[self class]];
    uploneImgview.image =  [UIImage imageWithContentsOfFile:[bundle pathForResource:@"MinorLib.bundle/3" ofType:@"png"]];
    self.view.backgroundColor = [UIColor lightGrayColor];
    [self.view addSubview:uploneImgview];
    UIButton *btn = [[UIButton alloc]init];
    btn.backgroundColor = [UIColor redColor];
    [btn addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside];
    [btn setTitle:@"点击进入库说明页" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [self.view addSubview:btn];
    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(uploneImgview.mas_bottom).offset(30);
        make.left.equalTo(uploneImgview);
        make.right.equalTo(uploneImgview);
        make.height.mas_equalTo(60);
    }];
    
}
- (void)buttonAction:(UIButton *)sender {
    PrinterViewController *noVC = [[PrinterViewController alloc] init];
    [self presentViewController:noVC animated:YES completion:nil];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
